package cn.phonevane.service.impl;

import java.util.List;

import cn.phonevane.dao.BaseDao;
import cn.phonevane.model.TArticleFile;
import cn.phonevane.service.ArticleFileService;

public class ArticleFileServiceImpl implements ArticleFileService{
	private BaseDao baseDao;

	
	public BaseDao getBaseDao() {
		return baseDao;
	}


	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}
	
	
	/**
	 * 添加文章附件
	 * @return boolean
	 */
	public boolean add(Object object) {
		
		return this.baseDao.save(object);
	}
	
	/**
	 * 获取文章附件
	 * @return 集合
	 */
	public List<TArticleFile> getByIndex(String fileIndex) {
		String hql="from TArticleFile as a where articleFileIndex='"+fileIndex+"'";
		return this.baseDao.find(hql);
	}

	

}
